<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>Document</title>
</head>
<style>
.main{
	height: 400px;
	width: 500px;

	background-color: darkgray;
		/* 核心代码:留白 */
	padding-left: 100px;
	padding-right: 50px;
}
.center{
	height: 100px;
	width: 100%;
	background-color: red;
	float: left;

}
.left{
	height: 100px;
	width: 100px;
	background-color: gold;
	float: left;
	/* 核心代码 */
	margin-left: -100%;
	position: relative;
	left: -100px;
}
.right{
	height: 100px;
	width: 50px;
	background-color: green;
	float: left;
	/* 核心代码 */
	margin-left: -50px;
	position: relative;
	right: -50px;
}
</style>
<body>
	<div class="main">
		<div class="center"></div>
		<div class="left"></div>
		<div class="right"></div>
	</div>
</body>
</html>